<template>
  <div class="orderFinish">
    <qing-nav-bar title="支付结果"></qing-nav-bar>
    <div class="desc">
      <van-icon name="checked" />
      <div class="success">支付成功 付款<span class="money">{{money | toMoney}}</span>元</div>
      <van-button type="primary" @click="$router.push('/')">返回首页</van-button>
    </div>
  </div>
</template>
<script>
import qingNavBar from '@/components/component/qingNavBar.vue'
import { toMoney } from '@/filter/moneyFilter.js'
export default {
  name: 'OrderFinish',
  components: {
    qingNavBar
  },
  filters: {
    toMoney(money) {
      return toMoney(money)
    }
  },
  data () {
    return {
      money: null // 付款的金额
    }
  },
  methods: {
  },
  created () {
    this.money = this.$route.query.money / 100
  },
  mounted () {
  },
}
</script>
<style lang="less" scoped>
.orderFinish {
  position: relative;
  height: 100%;
  padding: 50px 0;
  background: #f5f7f9;
  .desc {
    position: absolute;
    top: 39%;
    left: 50%;
    transform: translate(-50%, -50%);
    .van-icon {
      font-size: 28px;
      color: #07c160;
    }
    .success {
      margin: 10px 0 10px 0;
      font-size: 20px;
      font-weight: 700;
    }
    .money {
      color: red;
    }
  }
}
</style>
